package com.dhcc.DRGsHosp.facade.impl.quartzjob;

import java.util.HashMap;
import java.util.Map;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import com.dhcc.DRGsHosp.facade.MedicalRecordQualityFacade;
import com.dhcc.DRGsHosp.infra.util.DrgsIndex;
import com.dhcc.DRGsHosp.infra.util.MonitorResultUtil;

/**
 *  @Discription：质控前一天推送的数据,定时任务调用
 *  @Author QiaoYiLong  
 *  @Date: 2019年02月13日 9:18:07
 */
public class MedicalRecordQualityFacadeQuartzJob implements Job {
	@Autowired
	MedicalRecordQualityFacade medicalRecordQualityFacade ;
	
	@Override
	public void execute(JobExecutionContext arg0) throws JobExecutionException {
        String now  = DrgsIndex.formateDateFrom(null) ;
        String dateFrom = MonitorResultUtil.addDay(now,-1) ;
        String dateTo  = dateFrom ;
        Map<String,Object> condition = new HashMap<>() ;
        condition.put("dateFrom",dateFrom) ;
        condition.put("dateTo",dateTo) ;
        condition.put("dateType","pushDate") ;
        condition.put("pageSize",2000) ;
        medicalRecordQualityFacade.batchMedicalRecordQualityAnalysis(condition) ;
	}

}
